home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / Back&Front / toBack&Front.doc < prev    next >
Text File  |  1996-09-26  |  11KB  |  279 lines

  1.  
  2.                              toBack&Front
  3.  
  4.                              (Commodity)
  5.  
  6.                                   by
  7.  
  8.                             Stefan Sticht
  9.  
  10.          This program (binary), sourcecode, documentation is
  11.  
  12.                             PUBLIC DOMAIN.
  13.  
  14.                      You may do anything with it!
  15.  
  16.  
  17.  
  18.                              Description
  19.  
  20. toBack& Front is a commodity, with which you  can  easily  switch  the
  21. window under the mouse pointer in front of all others  or  behind  all
  22. others. If the mousepointer is over an backdrop window or the titlebar
  23. of a screen or no window, the screen is switched to front or back. For
  24. example you may install toBack&Front to bring any window to  front  if
  25. you double-click in it. Or if you make three fast clicks, so that this
  26. doesn't interfere with double-clicking an icon.  You  may  install  it
  27. that double-clicking into a window while  holding  the  left  alt  key
  28. pressed switches the window to back. Which action switches a window or
  29. screen to back or front is changeable. Most inputevents (e.g. keyboard
  30. or mouse events) can be such an action.
  31.  
  32.  
  33.                              Requirements
  34.  
  35. This commodity requires AmigaOS 2.0, at least Kickstart  37.175.  This
  36. version is also known as AmigaOS 2.04. Please check this out using the
  37. About menu item from the Workbench's menu.
  38.  
  39.  
  40.                         Starting toBack&Front
  41.  
  42. Just make a double-click on  its  icon.  Starting  toBack&Front  twice
  43. removes it. You can quit it with Exchange's Kill gadget, too.  If  you
  44. want to start it with every boot, just copy the  icon  in  the  drawer
  45. WBStartup of your Workbench.
  46. You can start toBack&Front from the Shell with
  47.  
  48.                           <path>toBack&Front
  49.  
  50. Please  replace  <path>  with  your   path   to   toBack&Front,   e.g.
  51. SYS:Tools/Commodities/. If you start toBack&Front with
  52.  
  53.                      Run >NIL: <path>toBack&Front
  54.  
  55. you are able to close the shell or do anything else with it.  You  may
  56. quit it by starting it twice or using  the  DOS  commands  Status  and
  57. Break: Execute Status and look for number of toBack&Front's process in
  58. the second column. Using Break <number> C removes toBack&Front.
  59.  
  60.  
  61.                                Exchange
  62.  
  63. Exchange is the commodities controller program. With Exchange you can
  64. control all commodities: you can kill, disable, enable, show and hide
  65. commodities.
  66.     Start the Exchange program, which  usually  is  in  the  Utilities
  67. drawer of your Workbench disk, by double clicking its  icon.  Now  you
  68. see a list of the available commodities. Select the commodity you want
  69. to control. The commodities title, description and status is shown now
  70. below the listview gadget.
  71.     You  can  kill  the  commodity  using  the  Kill gadget...  If the
  72. commodity  has  a  window  to  open,  in which you usually change some
  73. parameters,  you  can  open  this window using Show.  Hide closes this
  74. window. toBack&Front has no window to open.
  75.  
  76.  
  77.                                Options
  78.  
  79. If you start toBack&Front from  the  Workbench,  you  specify  options
  80. using tool types. Select toBack&Front's icon and call  the  menu  item
  81. Information from the  Workbench's  menu.  In  the  window,  which  has
  82. opened, you can change the tool types  of  toBack&Front.  Please  read
  83. your Workbench documentation for further information.
  84. In the Shell you specify options after the program name, e.g.
  85.  
  86.                       toBack&Front back_clicks=3
  87.  
  88. If an option requires a string, which contains blanks, you must  quote
  89. the string:
  90.  
  91.                       toBack&Front back_action="lalt f1"
  92.  
  93. Here the template:
  94.  
  95.  CX_PRI0RITY/K/N,BACK_ACTI0N/K,BACK_CLICKS/K/N,BACK_REM0VE/S,
  96.  BACK_LEFTBUTT0NUP/S, FR0NT_ACTI0N/K,FR0NT_CLICKS/K/N,FR0NT_REM0VE/S,
  97.  FR0NT_LEFTBUTT0NUP/S
  98.  
  99. The description of the options:
  100.  
  101.                              CX_Priority
  102.  
  103. You can specify the priority of the commodity within  the  commodities
  104. queue using CX_PRIORITY=<number>, where <number> is the decimal  value
  105. for the priority. Default priority is 0.
  106.  
  107.                              Front_Action
  108.  
  109. FRONT_ACTION=<string> specifies which action switches  the  window  or
  110. screen to front. <string> is an input description string as  described
  111. below.   Default   action   is    "FRONT_ACTION=rawmouse    leftbutton
  112. lbuttoncode" (left mousebutton).
  113.  
  114.                              Front_Clicks
  115.  
  116. FRONT_CLICKS=<number> specifies how many  actions  have  to  occur  to
  117. switch something to front. Two actions must always  occur  within  the
  118. doubleclick-timeout, which you can specify in the  Input  preferences.
  119. For example if you  want  a  window  to  be  switched  to  front  when
  120. double-clicking in it, you must set  Front_Action  to  trap  the  left
  121. mousebutton and set Front_clicks=2. If you want  triple-clicking,  set
  122. Front_clicks=3 etc. Default is front_clicks=2.
  123.  
  124.                              Front_Remove
  125.  
  126. The keyword FRONT_REMOVE specifies that the inputevent for  the  front
  127. action shall be removed and not being sent further to other  programs.
  128. For example setting front action to trap a double  click  and  setting
  129. front_remove isn't useful, because any double-click will be  eaten  by
  130. toBack&Front.  Then  you  can't  start  any  longer   a   program   by
  131. double-clicking its icon. On the other hand it  might  be  usefull  to
  132. remove the inputevent,  for  example  if  specify  the  action  to  be
  133. pressing left alt and f once: if you don't specify front_remove,  then
  134. pressing left alt and a while the  mouse  pointer  is  over  an  shell
  135. window may write something in the window (depends on your keymap)  and
  136. switches it to front. If you set front_remove, only the  front  action
  137. takes place without writing something in any window.
  138.  
  139.  
  140.                           Front_Leftbuttonup
  141.  
  142. Specifying Front_Leftbuttonup simulates a release of  the  left  mouse
  143. button when the front_action happens. Please see Back_Leftbuttonup for
  144. a detailed description.
  145.  
  146.                              Back_Action
  147.  
  148. BACK_ACTION=<string> specifies which action  switches  the  window  or
  149. screen to  back,  analogous  to  Front_Action.  Default  is  "rawmouse
  150. leftbutton rbutton rbuttoncode" (holding left mousebutton pressed  and
  151. pressing right mousebutton).
  152.  
  153.                              Back_Clicks
  154.  
  155. Like Front_Clicks BACK_CLICKS=<number> specifies how many actions have
  156. to occur to switch something to back. Default is 1.
  157.  
  158.                              Back_Remove
  159.  
  160. The keyword BACK_REMOVE specifies that the  inputevent  for  the  back
  161. action shall be removed. Please specify this keyword, if you  use  the
  162. default action for back_action. It isn't automatically set.
  163.  
  164.                           Back_Leftbuttonup
  165.  
  166. When you use the default action for back_action you will notice,  that
  167. a screen or window doesn't go to  back  until  you  release  the  left
  168. mousebutton, if the mouse pointer was  over  a  screen's  or  window's
  169. titlebar. If you specify this option, a  release  of  the  left  mouse
  170. button  is  simulated,  if  the  back_action  contains   the   keyword
  171. leftbutton and not lbuttoncode and if the  mouse  pointer  is  over  a
  172. titlebar of window or screen.
  173.  
  174.  
  175.                       Input description strings
  176.  
  177. With  input  description  strings  you  can  specify  almost any input
  178. action,  for  example  the action lshift f1, which means that pressing
  179. the  left  shift  and  the  f1  key  together  is the action.  In this
  180. commodity  you  can specify the action to open the commodity's window,
  181. as described above.
  182.  
  183. Input description strings have the following template:
  184.  
  185.       [class] (([-]qual)|syn)* [[-]upstroke] [highmap|ANSIcode]
  186.  
  187.   (* = zero or more occurances of the of the expression in brackets)
  188.  
  189. class   is one of the following strings:
  190.         rawkey, rawmouse, event, pointerpos, timer, newprefs,
  191.         diskremoved, diskinserted.
  192.         If not specified, the class is taken to be "rawkey".
  193.  
  194. qual    is one of the strings:
  195.         lshift, rshift, capslock, control, lalt, ralt, lcommand,
  196.         rcommand, numericpad, repeat, midbutton, rbutton, leftbutton,
  197.         relativemouse
  198.         A preceding '-' means that the value of the corresponding
  199.         qualifier is to be considered irrelevant.
  200.  
  201. syn     (synonym) is one of the strings: shift, caps, alt
  202.         shift means "left or right shift"
  203.         caps means "shift or capslock"
  204.         alt means "either alt key"
  205.  
  206. upstroke (literally "upstroke")
  207.         if this token is absent, only downstrokes are considered
  208.         for rawmouse (mousebuttons) and rawkey events.  If it is
  209.         present alone, only upstrokes count.  If it preceded by
  210.         '-' it means that both up and down strokes are included.
  211.  
  212. highmap one of the strings:
  213.         comma, space, backspace, tab, enter, return, esc, del, up,
  214.         down, right, left, help, f1, f2, f3, f4, f5, f6, f7, f8, f9,
  215.         f10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, (, ), /, *, -, +
  216.         lbuttoncode¹, mbuttoncode¹, rbuttoncode¹
  217.  
  218. ansicode a single character token is interpreted as a character code,
  219.         which is looked up in the system default keymap.
  220.  
  221. ¹ these keywords are only recognized by toBack&Front
  222.  
  223.  
  224.                                Examples
  225.  
  226. To front  with  left  mousebutton  double-click,  to  back  with  left
  227. mousebutton and right mousebutton. The actions are  the  default  ones
  228. and haven't to be specified, but back_remove should be specified when
  229. using the default action for to back:
  230. toBack&Front back_remove back_leftbuttonup
  231.  
  232. To front when pressing left alt and f1, no back_action:
  233. toback&Front front_action="lalt f1" front_clicks=1 front_remove
  234.              back_action=""
  235.  
  236. To front when double-clicking with left mouse  button,  to  back  when
  237. clicking with the middle mouse button (requires three button mouse!):
  238. toback&Front back_action="rawmouse midbutton mbuttoncode" back_remove
  239.  
  240. To front  when  double-clicking  with  the  left  mouse  button  while
  241. pressing left alt key, to back when double-clicking  with  left  mouse
  242. button while pressing left amiga key:
  243. toback&Front front_action="rawmouse lalt leftbutton lbuttoncode"
  244.              back_action="rawmouse lcommand leftbutton lbuttoncode"
  245.              front_remove back_remove back_clicks=2
  246.  
  247. A funny example:
  248. To front when inserting a  disk  in  any  disk  drive,  to  back  when
  249. removing a disk from any drive:
  250. toback&Front front_action=diskinserted front_clicks=1
  251.              back_action=diskremoved back_clicks=1
  252.  
  253.  
  254.                            Version history
  255.  
  256. V1.09   Parsing of options changed. Program got smaller, but doesn't
  257.         self detach from shell anymore. Default for back_action
  258.         changed. New options (back|front)_leftbuttonup.
  259.  
  260. V1.08   bug fix: a lock up still happend using left and right
  261.         mousebutton
  262.  
  263. Older versions are described in toBack&Front.c.
  264.  
  265.  
  266.      Send bug-reports, enhancement-requests, questions, gifts to:
  267.  
  268.                             Stefan Sticht
  269.                           Bibereckerweg 40a
  270.                            D-8390 Passau 18
  271.                                  FRG
  272.  
  273. or (better) EMail to:
  274. sticht@edith.deg.sub.org
  275. Fido-Net: Stefan Sticht (2:246/200.4)
  276.  
  277. Please include the version number in a bug report.
  278.  
  279.